1. Field of the Invention
The present invention relates to a line symmetrical figure shaping apparatus, in particular, to a line symmetrical figure shaping apparatus for shaping a line symmetry of an input figure with respect to one or two symmetrical axes.
2. Description of the Related Art
Conventionally, as disclosed in Japanese Patent Laid-Open Publication No. 62-111369, a line symmetrical figure shaping apparatus of this type is used to automatically read a design drawing and recognize geometric symbols.
Next, with reference to the accompanying drawings, a first related art reference disclosed as Japanese Patent Laid-Open Publication No. 62-111369 will be described. FIG. 24 is a block diagram showing the structure of the first related art reference. Referring to FIG. 24, the apparatus according to the first related art reference comprises a recognizing process portion 101, a symbol table 102, and a symmetry converting portion 103. The recognizing process portion 101 comprises a symmetrical shape determining portion 111 and a comparing circuit 112.
Next, with reference to FIGS. 24 and 25, the operation of the apparatus according to the first related art reference will be described. FIG. 25 is a flow chart showing a process of the first related art reference.
An objective picture to be recognized is supplied to the recognizing process portion 101. The recognizing process portion 101 outputs a recognized result 1a as the recognized result of the input figure (at steps V1 and V2). The symmetrical figure determining portion 111 determines whether or not the recognized result 1a is a symmetrical symbol. To do that, the symmetrical figure determining portion 111 references a symbol table 102 that defines categories of symmetrical symbols and asymmetrical symbols (at step V3). At this point, unless the symbol is symmetrical, the recognized result 1a is treated as a recognized result of the symmetrical figure determining portion 111 (at step V10).
On the other hand, when the symmetrical figure determining portion 111 has determined that the symbol is symmetrical (namely, the determined result at step V3 is Yes), the symmetry converting portion 103 converts the symmetry of the input picture (at step V4).
Thereafter, the recognizing process portion 101 performs the recognizing process for the resultant picture once again. Thus, a recognized result 2a is obtained (at steps V5 and V6).
Next, the comparing circuit 112 compares the recognized result 1a with the recognized result 2a. When they match (namely, the determined result at step V7 is Yes), the recognized result 1a is output as a recognized result of the apparatus. When they do not match (namely, the determined result at step V7 is No), the recognized result is rejected as a non-recognized picture (at steps V7 to V9).
Next, as a second related art reference of the present invention, an apparatus as disclosed in Japanese Patent Laid-Open Publication 63-261481 will be described. The apparatus according to the second related art reference is used to recognize a drawing illustrated in a simplified drawing notation and compensate omitted dimensions in the drawing corresponding to the contents of the drawing.
Next, with reference to the accompanying drawings, the apparatus according to the second related art reference will be described. FIG. 26 is a block diagram showing the structure of the apparatus according to the second related art reference. Referring to FIG. 26, the apparatus according to the second related art reference comprises a figure recognizing unit 201, a symmetry alternative segment extracting means 202, a vertical segment designating means 203, a calculating means 204, and a drawing information designating means 205.
The figure recognizing unit 201 comprises a reading process portion 211, a picture data storing portion 212, a vector process portion 213, a vector categorizing process portion 214, a symbol recognizing process portion 215, a segment distinguishing process portion 216, a character recognizing process portion 217, and a recognized result storing portion 218.
Next, with reference to FIGS. 26 to 28, the operation of the apparatus according to the second related art reference will be described. FIG. 27 is a flow chart showing a process of the apparatus of the second related art reference. FIG. 28 is a schematic diagram for explaining a symmetry determining method of a shape line that intersects with a center line.
In the figure recognizing unit 201, drawing data is input from the reading process portion 211 to the picture data storing portion 212. The vector process portion 213 performs a broken line approximation for the picture data stored in the picture data storing portion 212, converts the picture data into vector data, and supplies the resultant data to the vector categorizing process portion 214.
The vector categorizing process portion 214 supplies symbols, segments, and characters of the vector data to the symbol recognizing process portion 215, the segment distinguishing process portion 216, and the character recognizing process portion 217, respectively. The segment distinguishing process portion 216 categorizes vector data that represents segments as shape lines, center lines, and so forth. The resultant data is stored in the recognized result storing portion 218. The symbol recognizing process portion 215 and the character recognizing process portion 217 distinguish symbols and characters. The distinguished symbols and characters are stored along with attributes based on the distinguished results to the recognized result storing portion 218 (at step W1).
Next, the symmetry alternative segment extracting means 202 extracts center lines that may be symmetrical to the input picture from the recognized result storing portion 218, counts the number of the center lines (at step W2), and determines whether there is a shape line that intersects with each of the center lines or a shape line that is isolated at an upper position, a lower position, a left position, or a right position of each of the center lines (at step W3). When there is a center line that intersects with a shape line or a center line that is isolated on both sides (namely, the determined result at step W4 is Yes), the vertical segment designating means 203 and the calculating means 204 distinguish a shape line or a symmetry in an isolated shapes.
Next, with reference to FIG. 28, a method for determining a symmetry will be described. For example, the vertical segment designating means 203 places a perpendicular L2 to a center line b from an edge point P2 of a vector. The calculating means 204 obtains a distance l2 between an edge point P2 and the center line b. In addition, the calculating means 204 obtains a distance m2 between a point of intersection X2 on a vector c that intersects with an extended line of the perpendicular L2 and the center line b.
The calculating means 204 calculates the difference between the two distances l2 and m2. When the following relation is satisfied with respect to a predetermined threshold value (.DELTA.1/2), the calculating means 204 performs the same calculation for other edge points. EQU .vertline.l2-m2.vertline.&lt;.DELTA.1/2 (1)
When the formula (1) is satisfied for all edge points and the sum of the difference between each two individual distances is satisfied with respect to a predetermined threshold value Q, it is determined that the shape line is symmetrical with respect to the center line b (at step W5). EQU .SIGMA..vertline.ln-mn.vertline.&lt;Q (2)
After the symmetrical determinations of all the center lines have been performed, the drawing information designating means 205 designates omitted drawing information corresponding to part of drawing information of the shape lines symmetrical to the center lines (at step W7).
A first drawback of the line symmetrical figure forming apparatus according to the first related art reference is in that when a symmetrical figure that has not been defined is input, it cannot be determined as a symmetrical figure.
In other words, all figures to be determined as symmetrical figures should be defined to the symbol table 102.
A second drawback of the line symmetrical figure shaping apparatus according to the second related art reference is in that the user should draw a figure considering symmetrical axes beforehand.
In other words, only center lines drawn with a particular type of line are recognized as symmetrical axes.